import axios from "@/utils/request";
import {Attention, Friend} from "@/model/home/makeFriend";

//获取所有用户
export function getList() {
    return axios({
        url: "/user/user/web/getList",
        method: "get"
    })
}

//关注其他人
export function attention(attention: Attention) {
    return axios({
        url: "/makeFriend/attention/web/attention",
        method: "post",
        data: attention
    })
}

//获取当前用户已关注的人
export function getUserAttentionById(userId: number) {
    return axios({
        url: "/makeFriend/attention/web/getUserAttentionById/" + userId,
        method: "get"
    })
}

//申请添加好友
export function applyFriend(friend: Friend) {
    return axios({
        url: "/makeFriend/friend/web/applyFriend",
        method: "post",
        data: friend
    })
}